package com.zomeid;

import java.time.ZoneId;
import java.util.Set;

public class ZoneIdTest1 {
    public static void main(String[] args) {
        Set<String> ZoneIds = ZoneId.getAvailableZoneIds();
        System.out.println(ZoneIds.size());
        System.out.println(ZoneIds);


        //获取当前系统的默认时区
        ZoneId zid = ZoneId.systemDefault();

        System.out.println(zid);

        //3获取指定的时区
        ZoneId zid1 = ZoneId.of("Asia/Shanghai");
        System.out.println(zid1);

    }
}
